package cn.lopr.hfbdqn.configuration;

import cn.lopr.hfbdqn.pojo.User;

/**
 * @author shuangyang7
 * @date 2021/5/30 11:49
 */
public class AuthInfo {
    private static final ThreadLocal<User> userThreadLocal = new ThreadLocal<>();

    public static void set(User user) {
        userThreadLocal.set(user);
    }

    public static User get() {
        return userThreadLocal.get();
    }

    public static void remove() {
        userThreadLocal.remove();
    }
}
